<style type="text/css" media="screen">
#title{
margin:10px auto;
width:800px;
height:25px;
border:1px solid black;
}
#title ul{
margin:5px;
}
#title ul li{
float:left;
margin-right:14px;
position:relative;
z-index:100;
}

#title ul li a{
display:block;
padding:0 8px;
background-color:white;
font-weight:700;
}

#title ul li a:hover{
background:none;
color:white;
}

#title ul li ul{
margin:0px;
background-color:white;
position:absolute;
width:70px;
display:none;
}

#title ul li:hover ul{
margin:0px;
background-color:white;
position:absolute;
width:70px;
display:block;
}



#title ul li ul li{
background-color:#88c366;
border-bottom:1px solid #bbb;
text-align:left;
width:100%;
}
 </style>
<div id="title">
  <ul>
   <li><a href="#">首页</a></li>
   <li>
    <a href="#">衬衫</a>
    <ul>
     <li><a href="#">长袖衬衫</a></li>
     <li><a href="#">短袖衬衫</a></li>
     <li><a href="#">无袖衬衫</a></li>
    </ul>
   </li>
   <li>
    <a href="#">裤子</a>
    <ul>
     <li><a href="#">休闲裤</a></li>
     <li><a href="#">卡其裤</a></li>
     <li><a href="#">牛仔裤</a></li>
    </ul>
   </li>
   <li><a href="#">联系我们</a></li>
  </ul>
 </div>
